package com.directv.z8training.ex4;

/**
 * @author HieuLT8
 *
 */
public class InitialContext {

	/**
	 * @param JNDI
	 * @return
	 */
	public Object lookup(String JNDI) {
		if (JNDI.equalsIgnoreCase("MySqlJDBCService")) {
			System.out
					.println("Looking up and creating a new MySqlJDBCService object");
			return new MySqlJDBCService();
		}
		else if (JNDI.equalsIgnoreCase("OracleJDBCService")) {
			System.out
					.println("Looking up and creating a new OracleJDBCService object");
			return new OracleJDBCService();
		}
		return null;
		
	}

}
